Optimal. Leaf size=139 \[ \frac {b d e n \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 \sqrt {f} \sqrt {g} \left (e^2 f+d^2 g\right )}+\frac {b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac {b e^2 n \log \left (f+g x^2\right )}{4 g \left (e^2 f+d^2 g\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 139, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2460, 720, 31,
649, 211, 266} \begin {gather*} -\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {b d e n \text {ArcTan}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 \sqrt {f} \sqrt {g} \left (d^2 g+e^2 f\right )}-\frac {b e^2 n \log \left (f+g x^2\right )}{4 g \left (d^2 g+e^2 f\right )}+\frac {b e^2 n \log (d+e x)}{2 g \left (d^2 g+e^2 f\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 211
Rule 266
Rule 649
Rule 720
Rule 2460
Rubi steps
\begin {align*} \int \frac {x \left (a+b \log \left (c (d+e x)^n\right )\right )}{\left (f+g x^2\right )^2} \, dx &=-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {(b e n) \int \frac {1}{(d+e x) \left (f+g x^2\right )} \, dx}{2 g}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {(b e n) \int \frac {d g-e g x}{f+g x^2} \, dx}{2 g \left (e^2 f+d^2 g\right )}+\frac {\left (b e^3 n\right ) \int \frac {1}{d+e x} \, dx}{2 g \left (e^2 f+d^2 g\right )}\\ &=\frac {b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}+\frac {(b d e n) \int \frac {1}{f+g x^2} \, dx}{2 \left (e^2 f+d^2 g\right )}-\frac {\left (b e^2 n\right ) \int \frac {x}{f+g x^2} \, dx}{2 \left (e^2 f+d^2 g\right )}\\ &=\frac {b d e n \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )}{2 \sqrt {f} \sqrt {g} \left (e^2 f+d^2 g\right )}+\frac {b e^2 n \log (d+e x)}{2 g \left (e^2 f+d^2 g\right )}-\frac {a+b \log \left (c (d+e x)^n\right )}{2 g \left (f+g x^2\right )}-\frac {b e^2 n \log \left (f+g x^2\right )}{4 g \left (e^2 f+d^2 g\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 165, normalized size = 1.19 \begin {gather*} \frac {2 b d e \sqrt {g} n \left (f+g x^2\right ) \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right )-\sqrt {f} \left (2 a e^2 f+2 a d^2 g-2 b e^2 n \left (f+g x^2\right ) \log (d+e x)+2 b \left (e^2 f+d^2 g\right ) \log \left (c (d+e x)^n\right )+b e^2 f n \log \left (f+g x^2\right )+b e^2 g n x^2 \log \left (f+g x^2\right )\right )}{4 \sqrt {f} g \left (e^2 f+d^2 g\right ) \left (f+g x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.78, size = 765, normalized size = 5.50
method | result | size |
risch | \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{2 g \left (g \,x^{2}+f \right )}+\frac {i \pi b \,e^{2} f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+i \pi b \,d^{2} g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b \,e^{2} f \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b \,d^{2} g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b \,d^{2} g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,e^{2} f \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b \,e^{2} f \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,d^{2} g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+2 \ln \left (e x +d \right ) b \,e^{2} g n \,x^{2}+\left (\munderset {\textit {\_R} =\RootOf \left (\left (d^{2} f \,g^{3}+e^{2} f^{2} g^{2}\right ) \textit {\_Z}^{2}+2 b \,e^{2} f g n \textit {\_Z} +e^{2} b^{2} n^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (-d^{2} g^{2}+3 e^{2} f g \right ) \textit {\_R} +3 e^{2} b n \right ) x +4 d e f g \textit {\_R} +b d e n \right )\right ) d^{2} g^{3} x^{2}+\left (\munderset {\textit {\_R} =\RootOf \left (\left (d^{2} f \,g^{3}+e^{2} f^{2} g^{2}\right ) \textit {\_Z}^{2}+2 b \,e^{2} f g n \textit {\_Z} +e^{2} b^{2} n^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (-d^{2} g^{2}+3 e^{2} f g \right ) \textit {\_R} +3 e^{2} b n \right ) x +4 d e f g \textit {\_R} +b d e n \right )\right ) e^{2} f \,g^{2} x^{2}+2 \ln \left (e x +d \right ) b \,e^{2} f n +\left (\munderset {\textit {\_R} =\RootOf \left (\left (d^{2} f \,g^{3}+e^{2} f^{2} g^{2}\right ) \textit {\_Z}^{2}+2 b \,e^{2} f g n \textit {\_Z} +e^{2} b^{2} n^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (-d^{2} g^{2}+3 e^{2} f g \right ) \textit {\_R} +3 e^{2} b n \right ) x +4 d e f g \textit {\_R} +b d e n \right )\right ) d^{2} f \,g^{2}+\left (\munderset {\textit {\_R} =\RootOf \left (\left (d^{2} f \,g^{3}+e^{2} f^{2} g^{2}\right ) \textit {\_Z}^{2}+2 b \,e^{2} f g n \textit {\_Z} +e^{2} b^{2} n^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (\left (-d^{2} g^{2}+3 e^{2} f g \right ) \textit {\_R} +3 e^{2} b n \right ) x +4 d e f g \textit {\_R} +b d e n \right )\right ) e^{2} f^{2} g -2 \ln \left (c \right ) b \,d^{2} g -2 \ln \left (c \right ) b \,e^{2} f -2 a \,d^{2} g -2 a \,e^{2} f}{4 \left (g \,x^{2}+f \right ) g \left (d^{2} g +f \,e^{2}\right )}\) | \(765\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 132, normalized size = 0.95 \begin {gather*} -\frac {1}{4} \, b n {\left (\frac {e \log \left (g x^{2} + f\right )}{d^{2} g^{2} + f g e^{2}} - \frac {2 \, e \log \left (x e + d\right )}{d^{2} g^{2} + f g e^{2}} - \frac {2 \, d \arctan \left (\frac {g x}{\sqrt {f g}}\right )}{{\left (d^{2} g + f e^{2}\right )} \sqrt {f g}}\right )} e - \frac {b \log \left ({\left (x e + d\right )}^{n} c\right )}{2 \, {\left (g^{2} x^{2} + f g\right )}} - \frac {a}{2 \, {\left (g^{2} x^{2} + f g\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 359, normalized size = 2.58 \begin {gather*} \left [-\frac {2 \, a d^{2} f g + 2 \, a f^{2} e^{2} + {\left (b d g n x^{2} + b d f n\right )} \sqrt {-f g} e \log \left (\frac {g x^{2} - 2 \, \sqrt {-f g} x - f}{g x^{2} + f}\right ) + {\left (b f g n x^{2} + b f^{2} n\right )} e^{2} \log \left (g x^{2} + f\right ) - 2 \, {\left (b f g n x^{2} e^{2} - b d^{2} f g n\right )} \log \left (x e + d\right ) + 2 \, {\left (b d^{2} f g + b f^{2} e^{2}\right )} \log \left (c\right )}{4 \, {\left (d^{2} f g^{3} x^{2} + d^{2} f^{2} g^{2} + {\left (f^{2} g^{2} x^{2} + f^{3} g\right )} e^{2}\right )}}, -\frac {2 \, a d^{2} f g + 2 \, a f^{2} e^{2} - 2 \, {\left (b d g n x^{2} + b d f n\right )} \sqrt {f g} \arctan \left (\frac {\sqrt {f g} x}{f}\right ) e + {\left (b f g n x^{2} + b f^{2} n\right )} e^{2} \log \left (g x^{2} + f\right ) - 2 \, {\left (b f g n x^{2} e^{2} - b d^{2} f g n\right )} \log \left (x e + d\right ) + 2 \, {\left (b d^{2} f g + b f^{2} e^{2}\right )} \log \left (c\right )}{4 \, {\left (d^{2} f g^{3} x^{2} + d^{2} f^{2} g^{2} + {\left (f^{2} g^{2} x^{2} + f^{3} g\right )} e^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.80, size = 218, normalized size = 1.57 \begin {gather*} \frac {b d n \arctan \left (\frac {g x}{\sqrt {f g}}\right ) e}{2 \, {\left (d^{2} g + f e^{2}\right )} \sqrt {f g}} - \frac {b n e^{2} \log \left (g x^{2} + f\right )}{4 \, {\left (d^{2} g^{2} + f g e^{2}\right )}} + \frac {b g n x^{2} e^{2} \log \left (x e + d\right ) - b d^{2} g n \log \left (x e + d\right ) - 2 \, b d^{2} g \log \left (c\right ) - 2 \, a d^{2} g - 2 \, b f e^{2} \log \left (c\right ) - 2 \, a f e^{2}}{2 \, {\left (d^{2} g^{3} x^{2} + f g^{2} x^{2} e^{2} + d^{2} f g^{2} + f^{2} g e^{2}\right )}} - \frac {b d^{2} g \log \left (c\right ) + a d^{2} g + b f e^{2} \log \left (c\right ) + a f e^{2}}{2 \, {\left (d^{2} g + f e^{2}\right )} {\left (g x^{2} + f\right )} g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.79, size = 366, normalized size = 2.63 \begin {gather*} \frac {b\,e^2\,n\,\ln \left (d+e\,x\right )}{2\,d^2\,g^2+2\,f\,e^2\,g}-\frac {\ln \left (\frac {\left (b\,e^2\,f\,g\,n+b\,d\,e\,n\,\sqrt {-f\,g^3}\right )\,\left (x\,\left (2\,d^2\,e\,g^3-6\,e^3\,f\,g^2\right )-8\,d\,e^2\,f\,g^2\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}+\frac {b\,d\,e^2\,g\,n}{2}+\frac {3\,b\,e^3\,g\,n\,x}{2}\right )\,\left (b\,e^2\,f\,g\,n+b\,d\,e\,n\,\sqrt {-f\,g^3}\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}-\frac {\ln \left (\frac {\left (b\,e^2\,f\,g\,n-b\,d\,e\,n\,\sqrt {-f\,g^3}\right )\,\left (x\,\left (2\,d^2\,e\,g^3-6\,e^3\,f\,g^2\right )-8\,d\,e^2\,f\,g^2\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}+\frac {b\,d\,e^2\,g\,n}{2}+\frac {3\,b\,e^3\,g\,n\,x}{2}\right )\,\left (b\,e^2\,f\,g\,n-b\,d\,e\,n\,\sqrt {-f\,g^3}\right )}{4\,\left (d^2\,f\,g^3+e^2\,f^2\,g^2\right )}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{2\,g\,\left (g\,x^2+f\right )}-\frac {a}{2\,g^2\,x^2+2\,f\,g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________